use sequence zmq event instead of hashblock#199
use sequence zmq event instead of hashblock#199RuslanProgrammer wants to merge 1 commit intoBlockstream:new-indexfrom
Conversation
|
The One issue I see with this approach is the overhead from the increased number of |
|
I agree with @Randy808 that triggering a mempool snapshot sync for each mempool update seems excessive. The mempool can update faster than a sync round takes to complete, which means that it'll basically be syncing the mempool non-stop. We could throttle it (the cap depends on how long a sync round can take which we can check in prometheus, but I would say around 1-2s seems sensible), but that doesn't really buy us much over the current 5s interval. With individual transaction processing (something I started working on a long time ago and will be reviving soon) ZMQ can be used to make mempool syncing real-time and efficient, but with the overhead of the current snapshot sync implementation we can't really push the interval much lower than it is now. The main benefit (assuming throttling) is that we can (somewhat) decrease the interval without introducing additional unnecessary work when the mempool is quiet, like we would if we just decreased the periodic polling interval. But I'm not sure if its worth it. |
Fixes: #198
We update the mempool every five seconds. This PR changes the trigger for the index, enabling us to reflect changes to the mempool more precisely.
This PR is open to choosing another subscription type and filtering the specific
sequenceevent.